package com.eorchis.module.trainingclass.ui.commond;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.ui.commond.ICommonField;
import com.eorchis.core.ui.commond.ICommond;
import com.eorchis.module.basedata.domain.BaseData;
import com.eorchis.module.trainingclass.domain.TrainingClass;
import com.eorchis.utils.DateUtil;
import com.eorchis.utils.utils.PropertyUtil;

/**
 * Title: TrainingClassValidCommond<br>
 * Description: 培训班信息ValidCommond<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2013-12-10
 * @version $Revision$
 */
public class TrainingClassValidCommond implements ICommond,ICommonField {
	
	private TrainingClass trainingClass;
	
	private String trainingDeptCode;//培训部门编号
	
	private String classType;//培训班类型 对应数据字典中的Code
	
	private String classnamePeriod;//期数
	
	private String trainingType;//培训类别   对应数据字典中的Code
	
	
	private String applyWay;//报名方式   对应数据字典中的Code
	
	private String beginDateStr;//开始时间
	
	private String endDateStr;//结束时间
	
	private String enterBeginTimeStr;//开班时间
	
	private String enterEndTimeStr;//结班时间
	private String auditReason;//审核意见
	private String auditUserName;//审核人
	private String auditUserId;//审核人Id
	private String organizerType;//主办单位类型    对应数据字典中的Code
	private String currYear;
	
	private Integer reportedNum;//报名人数
	private Integer attendanceNum;//全勤人数
	private Integer absenceNum;//缺勤人数
	private Integer leaveNum;//请假人数
	private Integer noAttendanceNum;//未出勤人数
	private String attendanceRate;//出勤率
	
	private String deptCode;  //部门code标识
	
	private String managerDepartId;  //管理范围
	private String classLevel;//班级级别,固定值 1：市  2：县
	
	private String assessStartTimeStr; // 评估开始时间
	private String assessEndTimeStr; // 评估结束时间
	
	private String updateInformation;//更新的信息，用于完善信息提醒功能
	private String roleCode;//角色编码
	

	private String []scopeDepartmentIds;//承办部门
	private String []signUpDepartmentIds;//报名部门
	private String[] scopeDepartmentNames;//承办部门
	private String[] signUpDepartmentNames;//承办部门
	
	private String currenDepartmentId;
	
	private Integer auditNum;//审核人数（合格人数）
	private Integer shiguanNum;//市管人数
	private Integer userNum;//报名人数
	private Double trainingDay;//天数
	private Integer days;
	private String classTypeStr;//班级类型
	
	public Integer getSignupOr() {
		return trainingClass.getSignupOr();
	}

	public void setSignupOr(Integer signupOr) {
		trainingClass.setSignupOr(signupOr);
	}
	
	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public String getUpdateInformation() {
		return updateInformation;
	}

	public void setUpdateInformation(String updateInformation) {
		this.updateInformation = updateInformation;
	}

	public String getMinistrieID() {
		return trainingClass.getMinistrieID();
	}

	public void setMinistrieID(String ministrieID) {
		trainingClass.setMinistrieID(ministrieID);
	}

	public String getMinistrieName() {
		return trainingClass.getMinistrieName();
	}

	public void setMinistrieName(String ministrieName) {
		trainingClass.setMinistrieName(ministrieName);
	}

	public TrainingClassValidCommond(){
		trainingClass = new TrainingClass();
	}
	
	public TrainingClassValidCommond(TrainingClass trainingClass){
		this.trainingClass = trainingClass;
	}

	public Serializable getEntityID() {
		return trainingClass.getClassId();
	}

	public IBaseEntity toEntity() {
		return trainingClass;
	}

	/**
	 * 获取培训班ID
	 */	
	
	public String getClassId() {
		return trainingClass.getClassId();
	}
	/**
	 * 设置培训班ID
	 */		
	public void setClassId(String classId) {
		trainingClass.setClassId(classId);
	}
	/**
	 * 获取培训班名称
	 */	
	public String getClassName() {
		return trainingClass.getClassName();
	}
	/**
	 * 设置培训班名称
	 */		
	public void setClassName(String className) {
		trainingClass.setClassName(className);
	}
	
	/**
	 * 获取培训班名称
	 */	
	public String getClassMainName() {
		return trainingClass.getClassMainName();
	}
	/**
	 * 设置培训班名称
	 */		
	public void setClassMainName(String classMainName) {
		trainingClass.setClassMainName(classMainName);
	}
	
	
	
	/**
	 * 获取培训班名称--年度
	 */	
	public String getClassnameYear() {
		return trainingClass.getClassnameYear();
	}
	/**
	 * 设置培训班名称--年度
	 */		
	public void setClassnameYear(String classnameYear) {
		trainingClass.setClassnameYear(classnameYear);
	}

	@Override
	public Date getCreateDate() {
		return null;
	}

	@Override
	public void setCreateDate(Date createDate) {
		
	}

	public String getClassnameUnit() {
		return trainingClass.getClassnameUnit();
	}

	public void setClassnameUnit(String classnameUnit) {
		trainingClass.setClassnameUnit(classnameUnit);
	}

	public Integer getClassUserNum() {
		return trainingClass.getClassUserNum();
	}

	public void setClassUserNum(Integer classUserNum) {
		trainingClass.setClassUserNum(classUserNum);
	}

	public Double getTrainingHour() {
		return trainingClass.getTrainingHour();
	}

	public void setTrainingHour(Double trainingHour) {
		trainingClass.setTrainingHour(trainingHour);
	}

	public Date getBeginDate() {
		return trainingClass.getBeginDate();
	}

	public void setBeginDate(Date beginDate) {
		trainingClass.setBeginDate(beginDate);
	}

	public Date getEndDate() {
		return trainingClass.getEndDate();
	}

	public void setEndDate(Date endDate) {
		trainingClass.setEndDate(endDate);
	}

	public Date getEnterBeginTime() {
		return trainingClass.getEnterBeginTime();
	}

	public void setEnterBeginTime(Date enterBeginTime) {
		trainingClass.setEnterBeginTime(enterBeginTime);
	}

	public Date getEnterEndTime() {
		return trainingClass.getEnterEndTime();
	}

	public void setEnterEndTime(Date enterEndTime) {
		trainingClass.setEnterEndTime(enterEndTime);
	}


	public String getTrainingAddress() {
		return trainingClass.getTrainingAddress();
	}

	public void setTrainingAddress(String trainingAddress) {
		trainingClass.setTrainingAddress(trainingAddress);
	}

	public String getClassDescription() {
		return trainingClass.getClassDescription();
	}

	public void setClassDescription(String classDescription) {
		this.trainingClass.setClassDescription(classDescription);
	}

	public Integer getPublishState() {
		return trainingClass.getPublishState();
	}

	public void setPublishState(Integer publishState) {
		trainingClass.setPublishState(publishState);
	}

	public Integer getOpenState() {
		return trainingClass.getOpenState();
	}

	public void setOpenState(Integer openState) {
		trainingClass.setOpenState(openState);
	}
	public Date getLatestOperateDate() {
		return trainingClass.getLatestOperateDate();
	}

	public void setLatestOperateDate(Date latestOperateDate) {
		trainingClass.setLatestOperateDate(latestOperateDate);
	}

	public Integer getEndState() {
		return trainingClass.getEndState();
	}

	public void setEndState(Integer endState) {
		trainingClass.setEndState(endState);
	}

	public TrainingClass getTrainingClass() {
		return trainingClass;
	}

	public void setTrainingClass(TrainingClass trainingClass) {
		this.trainingClass = trainingClass;
	}

	public String getClassType() {
		if(PropertyUtil.objectNotEmpty(trainingClass.getClassType())
				&&PropertyUtil.objectNotEmpty(trainingClass.getClassType().getDataCode())){
			return trainingClass.getClassType().getDataCode();
		}
		return "";
	}

	public void setClassType(String classType) {
		BaseData BaseData=new BaseData();
		BaseData.setDataCode(classType);
		trainingClass.setClassType(BaseData);
	}

	public String getTrainingType() {
		return trainingType;
	}

	public void setTrainingType(String trainingType) {
		this.trainingType = trainingType;
	}

	public String getApplyWay() {
		return applyWay;
	}

	public void setApplyWay(String applyWay) {
		this.applyWay = applyWay;
	}

	public String getBeginDateStr() {
		if(PropertyUtil.objectNotEmpty(beginDateStr)){
			return beginDateStr;
		}else{
			return DateUtil.getDateString(trainingClass.getBeginDate(), "yyyy-MM-dd");
		}
	}

	public void setBeginDateStr(String beginDateStr) {
		this.beginDateStr = beginDateStr;
	}

	public String getEndDateStr() {
		if(PropertyUtil.objectNotEmpty(endDateStr)){
			return endDateStr;
		}else{
			return DateUtil.getDateString(trainingClass.getEndDate(), "yyyy-MM-dd");
		}
	}

	public void setEndDateStr(String endDateStr) {
		this.endDateStr = endDateStr;
	}

	public String getEnterBeginTimeStr() {
		if(PropertyUtil.objectNotEmpty(enterBeginTimeStr)){
			return enterBeginTimeStr;
		}else{
			return DateUtil.getDateString(trainingClass.getEnterBeginTime(), "yyyy-MM-dd");
		}
	}

	public String getEnterEndTimeStr() {
		if(PropertyUtil.objectNotEmpty(enterEndTimeStr)){
			return enterEndTimeStr;
		}else{
			return DateUtil.getDateString(trainingClass.getEnterEndTime(), "yyyy-MM-dd");
		}
	}

	public void setEnterEndTimeStr(String enterEndTimeStr) {
		this.enterEndTimeStr = enterEndTimeStr;
	}

	public void setEnterBeginTimeStr(String enterBeginTimeStr) {
		this.enterBeginTimeStr = enterBeginTimeStr;
	}

	public Integer getReportState() {
		return trainingClass.getReportState();
	}

	public void setReportState(Integer reportState) {
		trainingClass.setReportState(reportState);
	}
	
	public Integer getAuditState() {
		return trainingClass.getAuditState();
	}

	public void setAuditState(Integer auditState) {
		trainingClass.setAuditState(auditState);
	}

	public String getAuditReason() {
		return auditReason;
	}

	public void setAuditReason(String auditReason) {
		this.auditReason = auditReason;
	}

	public String getAuditUserName() {
		return auditUserName;
	}

	public void setAuditUserName(String auditUserName) {
		this.auditUserName = auditUserName;
	}

	public String getAuditUserId() {
		return auditUserId;
	}

	public void setAuditUserId(String auditUserId) {
		this.auditUserId = auditUserId;
	}

	public String getOrganizerType() {
		return organizerType;
	}

	public void setOrganizerType(String organizerType) {
		this.organizerType = organizerType;
	}

	public Date getAuditDate() {
		return trainingClass.getAuditDate();
	}

	public void setAuditDate(Date auditDate) {
		trainingClass.setAuditDate(auditDate);
	}

	public String getClassNum() {
		return trainingClass.getClassNum();
	}

	public void setClassNum(String classNum) {
		trainingClass.setClassNum(classNum);
	}

	public String getTrainingDeptName() {
		return trainingClass.getTrainingDeptName();
	}

	public void setTrainingDeptName(String trainingDeptName) {
		trainingClass.setTrainingDeptName(trainingDeptName);
	}

	public String getSponsorID() {
		return trainingClass.getSponsorID();
	}

	public void setSponsorID(String sponsorID) {
		trainingClass.setSponsorID(sponsorID);
	}

	public Date getReportDate() {
		return trainingClass.getReportDate();
	}

	public void setReportDate(Date reportDate) {
		trainingClass.setReportDate(reportDate);
	}

	public String getSponsorName() {
		return trainingClass.getSponsorName();
	}

	public void setSponsorName(String sponsorName) {
		trainingClass.setSponsorName(sponsorName);
	}

	public String getTrainingDeptId() {
		return trainingClass.getTrainingDeptId();
	}

	public void setTrainingDeptId(String trainingDeptId) {
		trainingClass.setTrainingDeptId(trainingDeptId);
	}

	public String getTrainingDeptCode() {
		return trainingDeptCode;
	}

	public void setTrainingDeptCode(String trainingDeptCode) {
		this.trainingDeptCode = trainingDeptCode;
	}

	public String getClassnamePeriod() {
		return classnamePeriod;
	}

	public void setClassnamePeriod(String classnamePeriod) {
		this.classnamePeriod = classnamePeriod;
	}

	public String getCurrYear() {
		return currYear;
	}

	public void setCurrYear(String currYear) {
		this.currYear = currYear;
	}

	public Integer getActiveState() {
		return trainingClass.getActiveState();
	}

	public void setActiveState(Integer activeState) {
		trainingClass.setActiveState(activeState);
	}

	public Integer getSignUpState() {
		return trainingClass.getSignUpState();
	}

	public void setSignUpState(Integer signUpState) {
		trainingClass.setSignUpState(signUpState);
	}

	public Integer getPerfectState() {
		return trainingClass.getPerfectState();
	}

	public void setPerfectState(Integer perfectState) {
		trainingClass.setPerfectState(perfectState);
	}

	public Integer getAllotDeptState() {
		return trainingClass.getAllotDeptState();
	}

	public void setAllotDeptState(Integer allotDeptState) {
		trainingClass.setAllotDeptState(allotDeptState);
	}

	public Integer getReportedNum() {
		return reportedNum;
	}

	public void setReportedNum(Integer reportedNum) {
		this.reportedNum = reportedNum;
	}

	public Integer getAttendanceNum() {
		return attendanceNum;
	}

	public void setAttendanceNum(Integer attendanceNum) {
		this.attendanceNum = attendanceNum;
	}

	public Integer getAbsenceNum() {
		return absenceNum;
	}

	public void setAbsenceNum(Integer absenceNum) {
		this.absenceNum = absenceNum;
	}

	public Integer getLeaveNum() {
		return leaveNum;
	}

	public void setLeaveNum(Integer leaveNum) {
		this.leaveNum = leaveNum;
	}

	public Integer getNoAttendanceNum() {
		return noAttendanceNum;
	}

	public void setNoAttendanceNum(Integer noAttendanceNum) {
		this.noAttendanceNum = noAttendanceNum;
	}

	public String getAttendanceRate() {
		return attendanceRate;
	}

	public void setAttendanceRate(String attendanceRate) {
		this.attendanceRate = attendanceRate;
	}

	public String getDeptCode() {
		return deptCode;
	}

	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}

	public String getManagerDepartId() {
		return managerDepartId;
	}

	public void setManagerDepartId(String managerDepartId) {
		this.managerDepartId = managerDepartId;
	}

	public String getClassLevel() {
		return trainingClass.getClassLevel();
	}

	public void setClassLevel(String classLevel) {
		trainingClass.setClassLevel(classLevel);
	}
	
	
	
	public String getJointMinistrieID() {
		return trainingClass.getJointMinistrieID();
	}
	public void setJointMinistrieID(String jointMinistrieID) {
		trainingClass.setJointMinistrieID(jointMinistrieID);
	}
	public String getJointMinistrieName() {
		return trainingClass.getJointMinistrieName();
	}
	public void setJointMinistrieName(String jointMinistrieName) {
		trainingClass.setJointMinistrieName(jointMinistrieName);
	}
	public String getContactPeople() {
		return trainingClass.getContactPeople();
	}
	public void setContactPeople(String contactPeople) {
		trainingClass.setContactPeople(contactPeople);
	}
	public String getContactTel() {
		return trainingClass.getContactTel();
	}
	public void setContactTel(String contactTel) {
		trainingClass.setContactTel(contactTel);
	}
	public String getFax() {
		return trainingClass.getFax();
	}
	public void setFax(String fax) {
		trainingClass.setFax(fax);
	}

	public String getSelectedLetters() {
		return trainingClass.getSelectedLetters();
	}

	public void setSelectedLetters(String selectedLetters) {
		trainingClass.setSelectedLetters(selectedLetters);
	}

	public String getExpectTime() {
		return trainingClass.getExpectTime();
	}

	public void setExpectTime(String expectTime) {
		trainingClass.setExpectTime(expectTime);
	}

	public String getQuestionnaireUrl() {
		return trainingClass.getQuestionnaireUrl();
	}

	public void setQuestionnaireUrl(String questionnaireUrl) {
		trainingClass.setQuestionnaireUrl(questionnaireUrl);
	}

	public Date getAssessStartTime() {
		return trainingClass.getAssessStartTime();
	}

	public void setAssessStartTime(Date assessStartTime) {
		trainingClass.setAssessStartTime(assessStartTime);
	}

	public Date getAssessEndTime() {
		return trainingClass.getAssessEndTime();
	}

	public void setAssessEndTime(Date assessEndTime) {
		trainingClass.setAssessEndTime(assessEndTime);
	}

	public String getAssessStartTimeStr() {
		return assessStartTimeStr;
	}

	public void setAssessStartTimeStr(String assessStartTimeStr) {
		this.assessStartTimeStr = assessStartTimeStr;
	}

	public String getAssessEndTimeStr() {
		return assessEndTimeStr;
	}

	public void setAssessEndTimeStr(String assessEndTimeStr) {
		this.assessEndTimeStr = assessEndTimeStr;
	}

	public String [] getScopeDepartmentIds() {
		return scopeDepartmentIds;
	}

	public void setScopeDepartmentIds(String [] scopeDepartmentIds) {
		this.scopeDepartmentIds = scopeDepartmentIds;
	}

	public String[] getSignUpDepartmentIds() {
		return signUpDepartmentIds;
	}

	public void setSignUpDepartmentIds(String[] signUpDepartmentIds) {
		this.signUpDepartmentIds = signUpDepartmentIds;
	}

	public String[] getScopeDepartmentNames() {
		return scopeDepartmentNames;
	}

	public void setScopeDepartmentNames(String[] scopeDepartmentNames) {
		this.scopeDepartmentNames = scopeDepartmentNames;
	}

	public String[] getSignUpDepartmentNames() {
		return signUpDepartmentNames;
	}

	public void setSignUpDepartmentNames(String[] signUpDepartmentNames) {
		this.signUpDepartmentNames = signUpDepartmentNames;
	}

	public String getCurrenDepartmentId() {
		return currenDepartmentId;
	}

	public void setCurrenDepartmentId(String currenDepartmentId) {
		this.currenDepartmentId = currenDepartmentId;
	}

	public String getPhone() {
		return trainingClass.getPhone();
	}

	public void setPhone(String phone) {
		this.trainingClass.setPhone(phone);
	}
	
	public String getCategoryId() {
		return this.trainingClass.getCategoryId();
	}
	public void setCategoryId(String categoryId) {
		this.trainingClass.setCategoryId(categoryId);
	}
	public String getBeoffStation() {
		return this.trainingClass.getBeoffStation();
	}
	public void setBeoffStation(String beoffStation) {
		this.trainingClass.setBeoffStation(beoffStation);
	}
	
	public Integer getLockState() {
		return this.trainingClass.getLockState();
	}
	public void setLockState(Integer lockState) {
		this.trainingClass.setLockState(lockState);
	}

	public Integer getAuditNum() {
		return auditNum;
	}

	public void setAuditNum(Integer auditNum) {
		this.auditNum = auditNum;
	}

	public Integer getShiguanNum() {
		return shiguanNum;
	}

	public void setShiguanNum(Integer shiguanNum) {
		this.shiguanNum = shiguanNum;
	}

	public Integer getUserNum() {
		return userNum;
	}

	public void setUserNum(Integer userNum) {
		this.userNum = userNum;
	}

	public Double getTrainingDay() {
		if(PropertyUtil.objectNotEmpty(getTrainingHour())){
			return getTrainingHour()/8;
		}
		return trainingDay;
	}

	public void setTrainingDay(Double trainingDay) {
		this.trainingDay = trainingDay;
	}

	public Integer getDays() {
		if(PropertyUtil.objectNotEmpty(getTrainingHour())){
			return ((Double)(getTrainingHour()/8)).intValue();
		}
		return days;
	}

	public void setDays(Object days) {
		this.days = Integer.valueOf(days.toString());
	}

	public String getClassTypeStr() {
		return classTypeStr;
	}

	public void setClassTypeStr(String classTypeStr) {
		this.classTypeStr = classTypeStr;
	}

	public Date getLastOperateTime() {
		return trainingClass.getLastOperateTime();
	}

	public void setLastOperateTime(Date lastOperateTime) {
		trainingClass.setLastOperateTime(lastOperateTime);
	}
	
	
}
